package Multithreading.Callable_Future;

import java.util.concurrent.Callable;

/**
 * ClassName:MyCallable
 * Package:Multithreading.Callable_Future
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/3/5-14:54
 * @Version:v1.0
 */
public class MyCallable implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        //求1-100之间的和
        int sum = 0;
        for (int i = 1; i <= 100; i++) {
            sum += i;
        }
        return sum;
    }
}
